from django.conf import settings
from django.shortcuts import render, redirect
# 导包
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse, QueryDict, Http404
from new_app.models import *
from django.core.serializers import serialize
from rest_framework.response import Response
from rest_framework.views import APIView
from django.views import View
import json
# 导入上传文件夹配置
# from new_pro.settings import UPLOAD_ROOT
import os
# 导入公共目录变量
from new_pro.settings import BASE_DIR
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage, InvalidPage
# 导包
from django.db.models import Q, F, Avg, Max, Min
from rest_framework_jwt.utils import jwt_decode_handler
import random
import redis
import datetime
from dateutil.relativedelta import relativedelta
# Create your views here.
class Index(APIView):
    def get(self, request):
        res = {}
        res['code'] = 200
        res['message'] = '访问成功'
        print(res)
        return Response(res)
